package com.downhometech.productcalculator.activities;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class DefaultActivity extends Activity
{
	public boolean onCreateOptionsMenu(Menu menu)
	{
		 MenuInflater inflater = getMenuInflater();
		 inflater.inflate(R.menu.menu_default, menu);
		 return true;
	}
	
	public boolean onOptionsItemSelected(MenuItem item) 
	{
		Intent intent = null;
		switch(item.getItemId())
		{
			case R.id.menu_editDefaultValues:
				intent = new Intent(this, EditSettingsActivity.class);
				startActivity(intent);	 
				return true;
			case R.id.menu_goHome:
				intent = new Intent(this, CartActivity.class);
				startActivity(intent);	
				finish();
				return true; 
			case R.id.menu_addProduct:
				intent = new Intent(this, EditProductActivity.class);
				startActivity(intent);	
				return true; 
		}
		return false;
	}
	
}
